require("../../models/relation")
const express=require("express")
const router=express.Router()
const bokeServ=require("../../services/pl")

const {
    asyncHandler
}=require("../getSendResult")

router.post("/pushpl",asyncHandler(async(req,res,next)=>{
    console.log(req.body)
    if(req.body.text){
        return  await bokeServ.addpl(req.body)
    }else{
         throw new Error("Text is not null !!!")
    }
}))
router.post("/getmood",asyncHandler(async(req,res,next)=>{
  console.log(req.body)
    return await bokeServ.getmoodidfind(undefined,undefined,req.body.MoodId)
}))

module.exports=router